Array.prototype.unique = function () {
    var temp = {}, arr = [], len = this.length;
    for (var i = 0; i < len; i++) {
        if (!temp[this[i]]) {
            temp[this[i]] = 1;
            arr.push(this[i]);
        }
    }
    return arr;
}

var arr = [1, 1, 3, 4, 2, 3]

var res = arr.unique()

console.log(res)